home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 05.zip
/
BS1 part 5
/
IM_Install3.adf
/
piarc.LZH
/
harlview.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1992-05-05
|
2KB
|
88 lines
/*
* HARLVIEW.rexx
*
* Written by: Barry Chalmers
* Last Update: May 6th, 1992
* For: Black Belt Systems image processing series IM, IM F/c, and IP.
* ---------------------------------------------------------------------------
* Revision: 1.00 - Initial release. Requires IM 9.11 or later.
*/
parse arg jackin dx1 dy1 dx2 dy2
/*
* Default display modes - These need to be set to correct values
* corresponding to your HARLEQUIN
* display setup.
* (The PAL/NTSC is learned by asking IM.)
*/
mode = 0; /* 0 is 740x576 (PAL) or 740x486 (NTSC) */
/* 1 is 832x576 (PAL) or 832x486 (NTSC) */
/* 2 is 910x576 (PAL) or 910x486 (NTSC) */
lace = 0; /* 0 for NON-interlace 1 for Interlace */
if jackin = 'finish' then do
exit 0;
end;
/*
* open rexxsupport.library -- needed for some functions
*/
if ~show('L',"rexxsupport.library") then do
if addlib('rexxsupport.library',0,-30,0) then do
/* everything's ok */
end;
else do
say 'We Have A Library Problem, Unable To Load "rexxsupport.library"';
say 'Cannot operate script without this library - sorry!';
exit 10;
end;
end;
prtnme = 'IM_Port';
/*
* This code attempts to read a file called "picmdpath" from REXX:
* If it can't find it, the script will assume that the commands
* associated with this PI Module are in "c:". If the file exists,
* the script will look in the path that is specified in the file.
* If you create this file, you MUST put a complete, correct path
* in it; if the commands are in a sub-directory, you have to put
* the trailing slash on the path (like, device:dir/).
*
*/
cmdpath = 'c:';
if open(fhandle,'rexx:picmdpath','read') then /* open the file */
do
cmdpath = readln(fhandle);
call close(fhandle); /* close the file */
end
address(prtnme);
palntsc = 1; /* 0 for PAL 1 for NTSC */
options results;
'pal';
pal = result;
options;
if pal > 0 then palntsc = 0;
if jackin <= 0 then do
options results;
'jackin';
jackin = result;
options;
dx1 = -1;
dy1 = -1;
dx2 = -1;
dy2 = -1;
end;
address command cmdpath||'harlview '||jackin||' '||dx1||' '||dy1||' '||dx2||' '||dy2||' '||palntsc||' '||mode||' '||lace;
address(prtnme);
'finish';
address;
exit 0;